package com.itheima.d7_IO.Serializable;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

// 把文件中的对象 恢复成 Java中的对象
public class Test2 {
    public static void main(String[] args) throws Exception {
        FileInputStream fileInputStream = new FileInputStream("E:\\Empty\\NewFile1.txt");
        ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);
        Student o = (Student) objectInputStream.readObject();
        System.out.println(o);
    }
}
